# Contributor:
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=attica
pkgver=5.72.0
pkgrel=0
pkgdesc="Freedesktop OCS binding for Qt"
url="http://www.kde.org/"
arch="all !armhf" # Blocked by extra-cmake-modules
license="LGPL-2.0-or-later"
makedepends="qt5-qttools-dev extra-cmake-modules doxygen"
options="!check" # failing on builders
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/attica-$pkgver.tar.xz"

prepare() {
	default_prepare

	mkdir -p "$builddir"/build
}

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="b8730c6b3f0b268c07e2b6f9752ccf0b41953148bdb91087ddee5bbdfb496012e119486e66c48ecb9d4790a875baa8e0066e0c008396027f0ee440f74648c38b  attica-5.72.0.tar.xz"
